<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: aimath_q7_avr_pgm.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('aimath__q7__avr__pgm_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">aimath_q7_avr_pgm.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="aimath__q7__avr__pgm_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;aifes_config.h&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#if __AVR__</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#ifdef AIFES_WITH_AVR_PGM</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#ifndef AIMATH_Q7_AVR_PGM_H</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#define AIMATH_Q7_AVR_PGM_H</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aimath__q7__default_8h.html">basic/default/aimath/aimath_q7_default.h</a>&quot;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#a565effb18ceb9ce927a2e9bfd01174e9">   93</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#a565effb18ceb9ce927a2e9bfd01174e9">aimath_q7_avr_pgm_linear32_1</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *c, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#a2897c9e4917a426b7a83a5fa95256add">  150</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#a2897c9e4917a426b7a83a5fa95256add">aimath_q7_avr_pgm_linear32_2</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *c, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160; </div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160; </div>
<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#a7f2891f81c38a6c75ee83e30da2937b9">  209</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#a7f2891f81c38a6c75ee83e30da2937b9">aimath_q7_avr_pgm_linear32_bt_1</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *c, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160; </div>
<div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#a555535953ea7986db3dcf491944b03f2">  267</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#a555535953ea7986db3dcf491944b03f2">aimath_q7_avr_pgm_linear32_bt_2</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *c, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160; </div>
<div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#a53d817c9981488e8d0dacb91320cda9f">  303</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#a53d817c9981488e8d0dacb91320cda9f">aimath_q7_avr_pgm_relu</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *x, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160; </div>
<div class="line"><a name="l00345"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#ad4d2f63c565e7d4b9ac2cf7aef6c4844">  345</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#ad4d2f63c565e7d4b9ac2cf7aef6c4844">aimath_q7_avr_pgm_leaky_relu</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *x, <span class="keyword">const</span> <span class="keywordtype">void</span> *alpha, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160; </div>
<div class="line"><a name="l00400"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#a491ba7e29be29a27051c9a483afb983c">  400</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#a491ba7e29be29a27051c9a483afb983c">aimath_q7_avr_pgm_elu</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *x, <span class="keyword">const</span> <span class="keywordtype">void</span> *alpha, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160; </div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160; </div>
<div class="line"><a name="l00451"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#ad79eb5d753d38e97347096fd64783a46">  451</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#ad79eb5d753d38e97347096fd64783a46">aimath_q7_avr_pgm_sigmoid</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *x, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160; </div>
<div class="line"><a name="l00501"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#a0d03214721c6da17a577865834634de7">  501</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#a0d03214721c6da17a577865834634de7">aimath_q7_avr_pgm_tanh</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *x, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160; </div>
<div class="line"><a name="l00537"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#a7a63ddf00a06d19456f79a1cf49b0ef2">  537</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#a7a63ddf00a06d19456f79a1cf49b0ef2">aimath_q7_avr_pgm_softsign</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *x, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160; </div>
<div class="line"><a name="l00573"></a><span class="lineno"><a class="line" href="aimath__q7__avr__pgm_8h.html#aab25d76339b480c860dbc909cfd4049c">  573</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__q7__avr__pgm_8h.html#aab25d76339b480c860dbc909cfd4049c">aimath_q7_avr_pgm_softmax</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *x, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160; </div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AIMATH_Q7_AVR_PGM_H</span></div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160; </div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AIFES_WITH_AVR_PGM</span></div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// __AVR__</span></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_a0d03214721c6da17a577865834634de7"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#a0d03214721c6da17a577865834634de7">aimath_q7_avr_pgm_tanh</a></div><div class="ttdeci">void aimath_q7_avr_pgm_tanh(const aitensor_t *x, aitensor_t *result)</div><div class="ttdoc">Calculates the tanh of each element in a Q7  tensor.</div></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_a2897c9e4917a426b7a83a5fa95256add"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#a2897c9e4917a426b7a83a5fa95256add">aimath_q7_avr_pgm_linear32_2</a></div><div class="ttdeci">void aimath_q7_avr_pgm_linear32_2(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result)</div><div class="ttdoc">Performs a matrix multiplication of Q7  matrices a and b and adds a Q31  vector c to each row.</div></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_a491ba7e29be29a27051c9a483afb983c"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#a491ba7e29be29a27051c9a483afb983c">aimath_q7_avr_pgm_elu</a></div><div class="ttdeci">void aimath_q7_avr_pgm_elu(const aitensor_t *x, const void *alpha, aitensor_t *result)</div><div class="ttdoc">Calculates the exponential rectifier (ELU) value of each element in a Q7  tensor.</div></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_a53d817c9981488e8d0dacb91320cda9f"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#a53d817c9981488e8d0dacb91320cda9f">aimath_q7_avr_pgm_relu</a></div><div class="ttdeci">void aimath_q7_avr_pgm_relu(const aitensor_t *x, aitensor_t *result)</div><div class="ttdoc">Calculates the rectifier (ReLU) value of each element in a Q7  tensor.</div></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_a555535953ea7986db3dcf491944b03f2"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#a555535953ea7986db3dcf491944b03f2">aimath_q7_avr_pgm_linear32_bt_2</a></div><div class="ttdeci">void aimath_q7_avr_pgm_linear32_bt_2(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result)</div><div class="ttdoc">Performs a matrix multiplication of Q7  matrices a and b and adds a Q31  vector c to each row.</div></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_a565effb18ceb9ce927a2e9bfd01174e9"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#a565effb18ceb9ce927a2e9bfd01174e9">aimath_q7_avr_pgm_linear32_1</a></div><div class="ttdeci">void aimath_q7_avr_pgm_linear32_1(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result)</div><div class="ttdoc">Performs a matrix multiplication of Q7  matrices a and b and adds a Q31  vector c to each row.</div></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_a7a63ddf00a06d19456f79a1cf49b0ef2"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#a7a63ddf00a06d19456f79a1cf49b0ef2">aimath_q7_avr_pgm_softsign</a></div><div class="ttdeci">void aimath_q7_avr_pgm_softsign(const aitensor_t *x, aitensor_t *result)</div><div class="ttdoc">Calculates the softsign value of each element in a Q7  tensor.</div></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_a7f2891f81c38a6c75ee83e30da2937b9"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#a7f2891f81c38a6c75ee83e30da2937b9">aimath_q7_avr_pgm_linear32_bt_1</a></div><div class="ttdeci">void aimath_q7_avr_pgm_linear32_bt_1(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result)</div><div class="ttdoc">Performs a matrix multiplication of Q7  matrices a and b (transposed) and adds a Q31  vector c to eac...</div></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_aab25d76339b480c860dbc909cfd4049c"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#aab25d76339b480c860dbc909cfd4049c">aimath_q7_avr_pgm_softmax</a></div><div class="ttdeci">void aimath_q7_avr_pgm_softmax(const aitensor_t *x, aitensor_t *result)</div><div class="ttdoc">Calculates the softmax value of each batch element (row) of a Q7  tensor.</div></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_ad4d2f63c565e7d4b9ac2cf7aef6c4844"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#ad4d2f63c565e7d4b9ac2cf7aef6c4844">aimath_q7_avr_pgm_leaky_relu</a></div><div class="ttdeci">void aimath_q7_avr_pgm_leaky_relu(const aitensor_t *x, const void *alpha, aitensor_t *result)</div><div class="ttdoc">Calculates the leaky rectifier (leaky ReLU) value of each element in a Q7  tensor.</div></div>
<div class="ttc" id="aaimath__q7__avr__pgm_8h_html_ad79eb5d753d38e97347096fd64783a46"><div class="ttname"><a href="aimath__q7__avr__pgm_8h.html#ad79eb5d753d38e97347096fd64783a46">aimath_q7_avr_pgm_sigmoid</a></div><div class="ttdeci">void aimath_q7_avr_pgm_sigmoid(const aitensor_t *x, aitensor_t *result)</div><div class="ttdoc">Calculates the sigmoid of each element in a Q7  tensor.</div></div>
<div class="ttc" id="aaimath__q7__default_8h_html"><div class="ttname"><a href="aimath__q7__default_8h.html">aimath_q7_default.h</a></div><div class="ttdoc">Math functions for Q7  data type, default implementation.</div></div>
<div class="ttc" id="astructaitensor_html"><div class="ttname"><a href="structaitensor.html">aitensor</a></div><div class="ttdoc">A tensor in AIfES.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:89</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1e5d3661ed79af157d57e64a38265d09.html">basic</a></li><li class="navelem"><a class="el" href="dir_fb1774f2d451d1d60e2f94b58c26876a.html">avr_pgm</a></li><li class="navelem"><a class="el" href="dir_716836aaa50c3d724b5b6035350ace4c.html">aimath</a></li><li class="navelem"><a class="el" href="aimath__q7__avr__pgm_8h.html">aimath_q7_avr_pgm.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
